<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="icon" href="../img/asset-favico.ico">
        <title>传智健康</title>
        <link rel="stylesheet" href="../css/page-health-index.css" />
        <link rel="stylesheet" href="../css/page-health-login.css" />
        <link rel="stylesheet" href="../plugins/elementui/index.css" />
        <script src="../plugins/jquery/dist/jquery.min.js"></script>
        <script src="../plugins/healthmobile.js"></script>
        <script src="../plugins/vue/vue.js"></script>
        <script src="../plugins/vue/axios-0.18.0.js"></script>
        <script src="../plugins/elementui/index.js"></script>
    </head>
    <body data-spy="scroll" data-target="#myNavbar" data-offset="150">
        <div class="app" id="ad">
            <!-- 页面头部 -->
            <div class="top-header">
                <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
                <span class="center">预约记录</span>
                <span class="f-right"><i class="icon-more"></i></span>
            </div>
            <div class="input-row">
                <label>开始日期</label>
                <input v-model="startDate" type="date" class="input-clear" >
            </div>
            <div class="input-row">
                <label>结束日期</label>
                <input v-model="endDate" type="date" class="input-clear" >
            </div>
            <div class="input-row">
                <input type="button" class="input-clear" @click="findByDate" value="查询">
            </div>
            <!-- 页面内容 -->
            <div class="contentBox">
                <div class="list-column2">
                    <ul class="list" v-for="c in dataList">
                        <li class="type-item" style="width: 100%">
                            <a class="link-page">
                                <div class="type-title">
                                    <h3>{{c.member.name}}</h3>
                                    <p>{{c.member.sex}}</p>
                                    <p>{{c.setmeal.name}}</p>
                                    <p>{{c.orderDate}}</p>
                                </div>
                                <div class="type-icon">
                                    <a @click="examine(c.id)"> 查看</a>
                                </div>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </body>
<script>
    var vue = new Vue({
        el:"#ad",
        data:{
            dataList:[],
            startDate:"",
            endDate:"",
        },
        methods:{
            findByDate (){
                axios.post("/checkRecord/findAll.do?startDate="+this.startDate+"&&endDate="+this.endDate).then((res)=>{
                    vue.dataList = res.data.data
                })
            },
            examine(id){
                window.location.href="order_detail.html?id="+id
            }
        },
        created (){
            this.findByDate()
        }
    })
</script>
</html>